<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Header</title>

    <!--== 网站图标 ==-->
    <!--<link rel="shortcut icon" type="image/x-icon" href="img/Favorites.ico" media="screen">-->
    <!--== 样式文件 ==-->
    <!--<link href="css/share.css" rel="stylesheet" type="text/css">-->
</head>
<body>
    <!--==左侧==-->
    <div class="medat-nr-le">
        <!--头像-->
        <div class="medat-nr-let">
            <#if user.avatar?? && user.avatar!=''>
                <h1><img src="//${user.avatar}" alt=""></h1>
            <#else>
                <h1><img src="/website/images/top_03.png" alt=""></h1>
            </#if>
            <h2>${user.name}</h2>
            <!--<p>${user.phone}</p>-->
        </div>
        <!--菜单-->
        <div class="medat-nr-lel">
            <div class="list icon1"><a href="/website/personalData/me_data" class="hover" >个人资料</a></div>
            <div class="list icon1"><a href="/website/personalData/me_data_password" >修改密码</a></div>
            <div class="list icon2"><a href="/website/personalData/me_order_list?page=1&limit=10">我的订单</a></div>
            <div class="list icon3"><a href="/website/personalData/me_address_list" >我的地址</a></div>
            <div class="list icon4"><a href="javascript:void(0)" onclick="loginout()">退出登录</a></div>
        </div>
    </div>
</body>
<script>
    function loginout() {
        $.ajax({
            url: "/user/loginout",
            type: "POST",
            success: function (a) {
                if (a.code == "200") {
                    window.location.href = "/website/login";
                    return
                }
            },
            error: function () {
                layer.msg("系统登出失败")
            }
        })
    }
</script>
</html>